package com.ky.study.mapper;

import com.ky.common.param.ArticleVO;
import com.ky.study.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 文章表 Mapper 接口
 * </p>
 *
 * @author wgz
 * @since 2024-06-15
 */
public interface ArticleMapper extends BaseMapper<Article> {
    // @Select("SELECT a.*, s.file_id, s.article_id, s.file_url FROM `article` a LEFT JOIN `static` s ON a.article_id = s.article_id")
    @Select("SELECT a.*, s.* FROM `article` a LEFT JOIN `static` s ON a.article_id = s.article_id")
    List<ArticleVO> selectArticleWithStatics();
}
